<?php
/**
 * Created by PhpStorm.
 * User: wbb
 * Date: 15-2-12
 * Time: 下午5:04
 */

class Common {
    public function alert($info){
        echo $info;
    }

    public function checkRequest($validation, $requestField){
        $messages = $validation->validate($requestField);
        if (count($messages)) {
            foreach ($messages as $message) {
                $this->returnError($message->getMessage());
            }
        }
    }


} 